package com.haiya.composite.security;

/**
 * @author qiaoguoqiang
 *                   c0
 *                   /\
 *                  a  c1
 *                     /\
 *                    b  c
 *
 */
public class Client {
    public static void main(String[] args) {
        Composite c0 = new Composite();
        Composite c1 = new Composite();

        Leaf a = new Leaf("a");
        Leaf b = new Leaf("b");
        Leaf c = new Leaf("c");

        c0.addChild(a);
        c0.addChild(c1);
        c1.addChild(b);
        c1.addChild(c);

        c0.operation();
    }
}
